Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aburkut/back 1791 aave stata v2 #868

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

aburkut
Copy link
Member

@aburkut aburkut commented Dec 19, 2024

Original PR #856

@aburkut aburkut self-assigned this Dec 19, 2024
Copy link

linear bot commented Dec 19, 2024

BACK-1791

@aburkut aburkut marked this pull request as ready for review December 19, 2024 13:09
@aburkut aburkut requested a review from JackieJoo December 20, 2024 08:18
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next tokens are missing, is this on purpose?

[
    {
        "chainId": 1,
        "address": "0x1E6bb68Acec8fefBD87D192bE09bb274170a0548",
        "name": "Aave interest bearing AMPL",
        "decimals": 9,
        "symbol": "aAMPL",
        "tags": [
            "aTokenV2",
            "aaveV2"
        ],
        "logoURI": "https://raw.githubusercontent.com/bgd-labs/web3-icons/main/icons/full/aampl.svg",
        "extensions": {
            "pool": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "underlying": "0xD46bA6D942050d489DBd938a2C909A5d5039A161"
        }
    },
    {
        "chainId": 1,
        "address": "0x683923dB55Fead99A79Fa01A27EeC3cB19679cC3",
        "name": "Aave interest bearing FEI",
        "decimals": 18,
        "symbol": "aFEI",
        "tags": [
            "aTokenV2",
            "aaveV2"
        ],
        "logoURI": "https://raw.githubusercontent.com/bgd-labs/web3-icons/main/icons/full/afei.svg",
        "extensions": {
            "pool": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "underlying": "0x956F47F50A910163D8BF957Cf5846D573E7f87CA"
        }
    }
]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KanievskyiDanylo Could you please tag @sakulstra ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed them on purpose. Is custom implementations that are essentially broken

depositToAave: boolean,
];

export type RedeemParams = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not exported, as well as DepositParams

@@ -0,0 +1,63 @@
import { Address } from '../../types';

export type PoolState = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used

Comment on lines +216 to +220
const cached = await this.dexHelper.cache.get(
this.dexKey,
this.network,
`state_${stataAddressLower}`,
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes RPC call only once per block, considering that this swap is available only for the limited amount of tokens, do we really need to use cache here? just because for me it looks simples to use RPC call and store locally without touching cache at all

@@ -0,0 +1,494 @@
import { AsyncOrSync } from 'ts-essentials';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant import

extends SimpleExchange
implements IDex<AaveV3StataV2Data>
{
readonly hasConstantPriceLargeAmounts = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can put it as true

  // This is true if the the DEX is simply
  // wrapping/ unwrapping like weth, lending pools, etc
  // or has a pool where arbitrarily large amounts has
  // constant price.
  readonly hasConstantPriceLargeAmounts: boolean;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants